﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DynaPrecision.StandardFunction
{
	public class Cos<TInput,TResult> : FunctionAnalysis.IFunction<TInput,TResult>
	{

		#region IFunction<TInput,TResult> Members

		public Func<TInput, TResult> Functor
		{
			get { return x => (dynamic)Math.Cos((dynamic)x); }
		}

		public FunctionAnalysis.IFunction<TInput, TResult> Derivative
		{
			get { return new FunctionAnalysis.FunctionValueProduct<Sin<TInput,TResult>,TInput,TResult>(new Sin<TInput,TResult>(), (dynamic)(-1)); }
		}

		public FunctionAnalysis.IFunction<TInput, TResult> Integral
		{
			get { return new Sin<TInput,TResult>(); }
		}

		#endregion
	}
}